from DataManagement.models import DataCenterModel
from gxdm.models import *
from django.db import models

'''
专业数据子集
'''


class Gxxx06(DataCenterModel):
    class Meta(DataCenterModel.Meta):
        db_table = 'major'
        verbose_name = 'GXXX06 专业信息'
        verbose_name_plural = 'GXXX06 专业信息'

    zybh = models.CharField('专业编号', max_length=32, unique=True, primary_key=True, db_index=True)
    yxbh = models.ForeignKey(Dwbmdm, to_field='value', related_name='xx_06_dwh', on_delete=models.PROTECT,
                             db_column='yxbh', verbose_name="院系所号", blank=True, null=True)
    zymc = models.CharField('专业名称', max_length=32)
    lx = models.IntegerField('专业类型')

    def __str__(self):
        return self.zymc
